import { request } from '@umijs/max'; 

// 查询岗位信息列表
export async function getTenantpackageList(params?: API.System.TenantpackageListParams) {
  return request<API.System.tenantpackagePageResult>('/api/system/tenantpackage/list', {
    method: 'GET',
    headers: {
      'Content-Type': 'application/json;charset=UTF-8',
    },
    params
  });
}
export async function getTenantpackageSimpleList() {
  return request<API.System.tenantpackagePageResult>('/api/system/tenantpackage/get-simple-list', {
    method: 'GET',
    headers: {
      'Content-Type': 'application/json;charset=UTF-8',
    },
  });
}
// 查询岗位信息详细
export function getTenantpackage(tenantpackageId: number) {
  return request<API.System.TenantpackageInfoResult>(`/api/system/tenantpackage/${tenantpackageId}`, {
    method: 'GET'
  });
}

// 新增岗位信息
export async function addTenantpackage(params: API.System.Tenantpackage) {
  return request<API.Result>('/api/system/tenantpackage', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json;charset=UTF-8',
    },
    data: params
  });
}

// 修改岗位信息
export async function updateTenantpackage(params: API.System.Tenantpackage) {
  return request<API.Result>('/api/system/tenantpackage', {
    method: 'PUT',
    headers: {
      'Content-Type': 'application/json;charset=UTF-8',
    },
    data: params
  });
}

// 删除岗位信息
export async function removeTenantpackage(ids: string) {
  return request<API.Result>(`/api/system/tenantpackage/${ids}`, {
    method: 'DELETE'
  });
}

// 导出岗位信息
export function exportTenantpackage(params?: API.System.TenantpackageListParams) { 
  return request<API.Result>(`/api/system/tenantpackage/export`, {
    method: 'GET',
    params
  });
}
